//
//  AppTask.h
//  helper
//
//  Created by huangyi on 12-11-20.
//  Copyright (c) 2012年 huangyi. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface TaskQueue : NSObject

@property(nonatomic)BOOL running;

+(TaskQueue*)shared;
-(id)init;

-(NSString*)addTask:(dispatch_block_t)code;
-(NSString*)insertTask:(dispatch_block_t)code;
-(NSUInteger)numOfTasks;
-(void)run;
-(void)pause;
-(void)cancelAll;

@end
